import pandas as pd

df = pd.DataFrame(
    [
        {
            "username": "zhanghang",
            "password": "123",
            "permissions":["index", "task1", "permissionManage", "simulateTrade"]
         },
        {
            "username": "suli",
            "password": "123",
            "permissions": ["index", "task1"]
        },
        {
            "username": "dalong",
            "password": "123",
            "permissions": ["index", "task1"]
        }
    ]
)
print(df)
df.to_csv("permissions.csv", index=False)